
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <link rel="stylesheet" href="static/css/index_work.css">
    <title>Title</title>
</head>
<body>
            <form action="/User/upuser?id=${user.id}" method="post">
                <input value="updateuser" name="method" hidden>
                编号:<input type="text" name="id" value="${user.id}" readonly><br>
                姓名:<input type="text" name="name" value="${user.name}"><br>
                账号:<input type="text" name="username" value="${user.username}"><br>
                密码:<input type="password" name="pwd" value="${user.password}"><br>
                年龄:<input type="text" name="age" value="${user.age}"><br>
                性别:<input type="radio" name="sex" value="男" <c:if test="${user.sex=='男'}">checked</c:if>>男
                    <input type="radio" name="sex" value="女" <c:if test="${user.sex=='女'}">checked</c:if>>女<br>
                爱好:<c:forEach var="hobby" items="${hobby}">
                    <input type="checkbox" name="hobby"
                          <c:if test="${user.hobby.indexOf(hobby.name)>=0}">checked</c:if> value="${hobby.name}">${hobby.name}
                    </c:forEach>
                <br />
                角色:<select name="rid">
                    <option value="0">--请选择--</option>
                    <c:forEach var="role" items="${role}">
                        <option value="${role.id}" <c:if test="${user.rid==role.id}">selected</c:if>>--${role.name}--</option>
                    </c:forEach>
                    </select><br>
                <input type="submit" value="提交">
        </form>

</body>
</html>
